<div class="row">
    <div class="col-xs-12">
        <g:form id="form" useToken="true" url="${url}" class="form-horizontal" role="form">
            <input type="hidden" class="input-value" name="id"  value="${user?.id}"/>
            <div class="form-group  message alert">

            </div>
            <div class="form-group form-field field-username">
                <label class="col-sm-3 control-label no-padding-right" for="form-username"> 用户名: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="username" id="form-username" value="${user?.username}" placeholder="输入用户名" class="width-100" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>
            <div class="form-group form-field field-password">
                <label class="col-sm-3 control-label no-padding-right" for="form-password"> 口令: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:passwordField  name="password" id="form-password" value="" placeholder="输入口令" class="width-100" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>
            <div class="form-group form-field field-passwordConfirm">
                <label class="col-sm-3 control-label no-padding-right" for="form-passwordConfirm"> 确认口令: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:passwordField  name="passwordConfirm" id="form-passwordConfirm" value="" placeholder="确认口令" class="width-100" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>
            <div class="form-group form-field field-enabled">
                <label class="col-sm-3 control-label no-padding-right" for="form-enabled"> 启用: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:checkBox name="enabled" id="form-enabled"  checked="true" value="${user?.enabled}"></g:checkBox>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>
            <div class="form-group form-field field-gender">
                <label class="col-sm-3 control-label no-padding-right" for="form-gender"> 性别: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:radio name="gender" id="form-gender" value="0" checked="${user?.gender == 0}"></g:radio>男
                    <g:radio name="gender" value="1" checked="${user?.gender == 1}"></g:radio>女
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>


            <div style="display:none" class="form-group form-field field-isPhotographer">
                <label class="col-sm-3 control-label no-padding-right" for="form-isPhotographer"> 是否为摄影师: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:radio name="isPhotographer" id="form-isPhotographer" value="0" checked="${isPhotographer == 0}"></g:radio>非摄影师
                    <g:radio name="isPhotographer" value="1" checked="${isPhotographer == 1}"></g:radio>摄影师
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-nickName">
                <label class="col-sm-3 control-label no-padding-right" for="form-nickName"> 昵称: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="nickName" id="form-nickName" value="${user?.nickName}" placeholder="输入昵称" class="width-100" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-province">
                <label class="col-sm-3 control-label no-padding-right" for="form-province"> 省份: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="province" id="form-province" value="${users?.userAddress?.province}" placeholder="省份" class="width-50" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-city">
                <label class="col-sm-3 control-label no-padding-right" for="form-city"> 城市: </label>
                 <div class="col-xs-12 col-sm-4">
                    <g:textField  name="city" id="form-city" value="${users?.userAddress?.city}" placeholder="城市" class="width-50" />
                 </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-district">
                <label class="col-sm-3 control-label no-padding-right" for="form-district"> 区: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="district" id="form-district" value="${users?.userAddress?.district}" placeholder="区" class="width-50" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-address">
                <label class="col-sm-3 control-label no-padding-right" for="form-address"> 详细地址: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="address" id="form-address" value="${users?.userAddress?.address}" placeholder="详细地址" class="width-100" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-postCode">
                <label class="col-sm-3 control-label no-padding-right" for="form-postCode"> 邮编: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="postCode" id="form-postCode" value="${users?.userAddress?.postCode}" placeholder="邮编" class="width-30" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-email">
                <label class="col-sm-3 control-label no-padding-right" for="form-email"> 电子邮件: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="email" id="form-email" value="${user?.email}" placeholder="输入电子邮件" class="width-100" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>



            <div class="form-group form-field field-presentation">
                <label class="col-sm-3 control-label no-padding-right" for="form-presentation"> 自我介绍: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textArea   rows="5" cols="40" name="presentation" id="form-presentation" value="${user?.presentation}" placeholder="输入自我介绍"  />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>



            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        提交
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="reset">
                        <i class="icon-undo bigger-110"></i>
                        重置
                    </button>
                </div>
            </div>
        </g:form>
    </div>
</div>
<r:require module="mng_form"></r:require>
<r:script>

        (function($) {
            $(".selectPicker").selectPicker({
                width: 700, height: 500
            });
            $(".chosen-select").chosen();
            $('#form').ajaxForm({
                beforeSubmit: function() {
                    $("#form").jqFormClearErr();
                    $("#form").find("input[type=submit]").attr("disabled", true);
                },
                success: function(response) {
                    $("#form").find("input[type=submit]").attr("disabled", false);
                    $("#form").jqFormResponse({
                        response: response,
                        successUri: "<g:createLink controller="mngMember" action="indexCustomer"/>"
                    });

                },
                error: function() {
                    $("#form").find("input[type=submit]").attr("disabled", false);
                }
            });
        }(jQuery));


</r:script>